<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>AngularJs</title>
		<script type="text/javascript" src="../angular.js"></script>
	</head>
	<body ng-app="MyApp">
		
		<div ng-controller="list-controller">
			<ul>
				<li ng-repeat="n in names">
					{{n.name}}
					<ul ng-repeat="m in n.address">
						<li>{{m.add}}</li>
					</ul>
				</li>
			</ul>
		</div>
		<script>
			var app=angular.module("MyApp",[]);
			app.controller("list-controller",function($scope){
				$scope.names=[{
					name:"A",
					address:[{
						add:"地址A"
					}]
				},{
					name:"B",
					address:[{
						add:"地址B"
					}]
				}]
			})
		</script>
	</body>
</html>
